Unable to override external listener route host

您所在的位置:网站首页 metric route Unable to override external listener route host

Unable to override external listener route host

2023-04-10 16:37| 来源: 网络整理| 查看: 265

Symptoms

When deploying an instance of Event Streams with an external listener and overriding the host by using overrides.bootstrap/broker, the host fields do not persist in the custom resource and the changes do not take effect.

spec: strimziOverrides: kafka: listeners: external: type: route overrides: bootstrap: host: bootstrap.myhost.com brokers: - broker: 0 host: broker-0.myhost.com Causes

There are two CustomResourceDefinitions that are missing the host fields, and as such the Red Hat OpenShift Container Platform API server removes the fields when an instance of Event Streams is deployed containing those fields.

Resolving the problem

Modify the two CustomResourceDefinitions that have been deployed when the Event Streams operator was installed:

bootstrap host property:

host: type: string description: Host for the bootstrap route. This field will be used in the `spec.host` field of the OpenShift Route.

broker host property:

host: type: string description: Host for the broker route. This field will be used in the `spec.host` field of the OpenShift Route.

Add the properties to the strimziOverrides.kafka.listeners.external.overrides.(bootstrap|brokers) schemas in the eventstreams.eventstreams.ibm.com CustomResourceDefinition as follows:

oc edit crd eventstreams.eventstreams.ibm.com

If the apiVersion is apiextensions.k8s.io/v1, edit as follows:

apiVersion: apiextensions.k8s.io/v1 ... spec: versions: - name: v1beta1 schema: openAPIV3Schema: properties: spec: properties: strimziOverrides: properties: kafka: properties: listeners: properties: external: properties: overrides: properties: bootstrap: # ADD BOOTSTRAP HOST PROPERTY HERE ... brokers: items: properties: # ADD BROKER HOST PROPERTY HERE ...

If the apiVersion is apiextensions.k8s.io/v1beta1, edit as follows:

spec: validation: openAPIV3Schema: properties: spec: properties: strimziOverrides: properties: kafka: properties: listeners: properties: external: properties: overrides: properties: bootstrap: # ADD BOOTSTRAP HOST PROPERTY HERE ... brokers: items: properties: # ADD BROKER HOST PROPERTY HERE ...

Add the properties to the kafka.listeners.external.overrides.(bootstrap|brokers) schemas in the kafkas.eventstreams.ibm.com CustomResourceDefinition as follows:

oc edit crd kafkas.eventstreams.ibm.com

If the apiVersion is apiextensions.k8s.io/v1, edit as follows:

apiVersion: apiextensions.k8s.io/v1 ... spec: versions: - name: v1beta1 schema: openAPIV3Schema: properties: spec: properties: kafka: properties: listeners: properties: external: properties: overrides: properties: bootstrap: # ADD BOOTSTRAP HOST PROPERTY HERE ... brokers: items: properties: # ADD BROKER HOST PROPERTY HERE ...

If the apiVersion is apiextensions.k8s.io/v1beta1, edit as follows:

spec: validation: openAPIV3Schema: properties: spec: properties: kafka: properties: listeners: properties: external: properties: overrides: properties: bootstrap: # ADD BOOTSTRAP HOST PROPERTY HERE ... brokers: items: properties: # ADD BROKER HOST PROPERTY HERE ...

Note: If you uninstall or change the operator version, the CustomResourceDefinitions will be overridden. You will need to patch the values again.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3